#include "machine_parameter.h"

machine_parameter::machine_parameter(QObject *parent) :
    QObject(parent)
{
}

QDataStream & operator<<(QDataStream &datastream, const machine_parameter & data)
{
    return datastream
    << data.used_times_counter
    << data.machine_type_id
    << data.user_defined
    << data.serial_number
    << data.str_factory_time
    << data.license
    << data.limits_unlock
    << data.password_protect
    << data.bottom_exhaust_machine
    << data.is_water_supply_type
    << data.cold_exhaust_control_type
    << data.user_defined_1
    << data.user_defined_2
    << data.user_defined_3
    <<data.ad_checksum
    <<data.exhaust_valve_multiplex
    <<data.IO_drive_type
    <<data.temperature_control_type
    <<data.realtime_print_record
    <<data.IO_tracker
    <<data.door_near_switch;
}


QDataStream & operator>>(QDataStream &datastream, machine_parameter &data)
{
   datastream
                >> data.used_times_counter
                >> data.machine_type_id
                >> data.user_defined
                >> data.serial_number
                >> data.str_factory_time
                >> data.license
                >> data.limits_unlock
                >> data.password_protect
                >> data.bottom_exhaust_machine
                >> data.is_water_supply_type
                >> data.cold_exhaust_control_type
                >> data.user_defined_1
                >> data.user_defined_2
                >> data.user_defined_3
                >>data.ad_checksum
                >>data.exhaust_valve_multiplex
                >>data.IO_drive_type
                >>data.temperature_control_type
                >>data.realtime_print_record
                >>data.IO_tracker
                >>data.door_near_switch;
     return datastream;
}
